<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>随意购</title>

</head>
<body>
<div th:insert="/common/client_comm::header"></div>

<div class="container">
    <div class="row">
    <div class="col-md-12 p-2 m-2">
    <!-- 轮播 -->
    <div id="demo" class="carousel slide" data-bs-ride="carousel">

        <!-- 指示符 -->
        <div class="carousel-indicators">
            <button type="button" data-bs-target="#demo" data-bs-slide-to="0" class="active"></button>
            <button type="button" data-bs-target="#demo" data-bs-slide-to="1"></button>
            <button type="button" data-bs-target="#demo" data-bs-slide-to="2"></button>
        </div>

        <!-- 轮播图片 -->
        <div class="carousel-inner">
            <div class="carousel-item active">
                <img th:src="@{/images/adver/ad5.jpg}" class="d-block" style="height:350px;width:100%">
            </div>
            <div class="carousel-item">
                <img th:src="@{/images/adver/ad7.jpg}"  class="d-block" style="height:350px;width:100%">
            </div>
            <div class="carousel-item">
                <img th:src="@{/images/adver/1.jpg}"  class="d-block" style="height:350px;width:100%">
            </div>
        </div>

        <!-- 左右切换按钮 -->
        <button class="carousel-control-prev" type="button" data-bs-target="#demo" data-bs-slide="prev">
            <span class="carousel-control-prev-icon"></span>
        </button>
        <button class="carousel-control-next" type="button" data-bs-target="#demo" data-bs-slide="next">
            <span class="carousel-control-next-icon"></span>
        </button>
    </div>
    </div>
</div>
<div class="row">

    <div class="col-md-2 m-auto">
        <div class="card today-style" >
            <img class="card-img-top" th:src="@{/images/today.jpg}" alt="Card image" style="height:100%;width:100%">

        </div>

    </div>
    <div class="col-md-2 p-2" th:each="row:${hotlist}">
        <div class="card" >
            <img class="card-img-top" th:src="@{${row.goods_pic}}" alt="Card image" style="height:80%;width:100%">
            <div class="card-body" style="height: 6em">
                <p class="card-text " th:text="${row.goods_name}"></p>
            </div>
        </div>
    </div>
</div>
        <div class="row p-1" th:each="i:${#numbers.sequence(0,catelist.size()/2-1)}">
            <div class="col">
                <div class="card">
                    <div class="card-header bg-secondary text-white" th:text="${catelist[i * 2].cate_name}">
                        Featured
                    </div>
                    <div class="card-body">
                        <div class="row">
                        <div class="col-md-4" th:each="goodinfo:${gooslist} " th:if="${catelist[i * 2].cate_id}==${goodinfo.cate_id}">
                            <div class="card m-0" >
                                <img class="card-img-top"  th:src="@{${goodinfo.goods_pic}}" alt="Card image" style="height:80%;width:100%">
                                <div class="card-body" style="height: 6em">
                                    <p class="card-text text-center" th:text="${goodinfo.goods_name}"></p>
                                </div>
                            </div>
                        </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col">
                <div class="card">
                    <div class="card-header bg-secondary text-white" th:text="${catelist[i * 2 +1 ].cate_name}">
                        Featured
                    </div>
                    <div class="card-body">
                        <div class="row">
                            <div class="col-md-4" th:each="goodinfo:${gooslist} " th:if="${catelist[i * 2 +1 ].cate_id}==${goodinfo.cate_id}">
                                <div class="card" >
                                    <img class="card-img-top"  th:src="@{${goodinfo.goods_pic}}" alt="Card image" style="height:80%;width:100%">
                                    <div class="card-body" style="height: 6em">
                                        <p class="card-text text-center" th:text="${goodinfo.goods_name}"></p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>



<!--    <div class="row p-2" th:each="row:${level1list}">

        <div class="p-3 mb-2 bg-secondary text-white" th:text="${row.cate_name}"></div>
        <div class="col-md-2" th:each="i:${#numbers.sequence(1,6)}">
            <div class="card" >
                <img class="card-img-top" th:src="@{/images/goods/00.jpg}" alt="Card image" style="height:80%;width:100%">
                <div class="card-body">
                    <p class="card-text" th:text="${i}"></p>
                </div>
            </div>
        </div>

    </div>-->


</div>

<div th:insert="/common/client_comm::footer"></div>
</body>
</html>